package orbito.util;

import java.util.Random;

public class IntRange {
	
	/**
	 * The lower and upper bounds of this range.
	 */
	public int lower, upper;
	
	public IntRange(int lower, int upper) {
		this.lower = lower;
		this.upper = upper;
	}
	
	/**
	 * Gets a random value in the range [lower, upper-1].
	 * 
	 * @param rng The RNG to be used.
	 * @return The random number.
	 */
	public int getRandomInRange(Random rng) {
		return SimUtils.lerp(lower, upper, rng.nextDouble());
	}
}
